package com.muyu.payment.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.muyu.common.core.web.domain.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;
import lombok.experimental.SuperBuilder;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 提现订单实体类
 *
 * @author muyu
 * @date 2025-01-27
 */
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@TableName("withdraw_order")
@Schema(description = "提现订单")
public class WithdrawOrder extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    @Schema(description = "主键ID")
    private Long id;

    /**
     * 提现订单号
     */
    @Schema(description = "提现订单号")
    private String orderNo;

    /**
     * 用户ID
     */
    @Schema(description = "用户ID")
    private Long userId;

    /**
     * 用户账号
     */
    @Schema(description = "用户账号")
    private String userName;

    /**
     * 提现金额
     */
    @Schema(description = "提现金额")
    private BigDecimal amount;

    /**
     * 手续费
     */
    @Schema(description = "手续费")
    private BigDecimal fee;

    /**
     * 实际到账金额
     */
    @Schema(description = "实际到账金额")
    private BigDecimal actualAmount;

    /**
     * 提现渠道（1:支付宝 2:微信 3:银行卡）
     */
    @TableField("withdraw_channel")
    @Schema(description = "提现渠道（1:支付宝 2:微信 3:银行卡）")
    private Integer payType;

    /**
     * 收款账号
     */
    @Schema(description = "收款账号")
    private String receiveAccount;

    /**
     * 收款人姓名
     */
    @Schema(description = "收款人姓名")
    private String receiveName;

    /**
     * 订单状态（0:待审核 1:审核通过 2:处理中 3:提现成功 4:提现失败 5:已取消）
     */
    @Schema(description = "订单状态（1:待审核 2:审核通过 3:处理中 3:提现成功 4:提现失败 5:已取消）")
    private Integer orderStatus;

    /**
     * 第三方交易号
     */
    @Schema(description = "第三方交易号")
    private String thirdPartyTradeNo;

    /**
     * 审核时间
     */
    @Schema(description = "审核时间")
    private Date auditTime;

    /**
     * 审核人
     */
    @Schema(description = "审核人")
    private String auditor;

    /**
     * 审核备注
     */
    @Schema(description = "审核备注")
    private String auditRemark;

    /**
     * 处理时间
     */
    @Schema(description = "处理时间")
    private Date processTime;

    /**
     * 失败原因
     */
    @Schema(description = "失败原因")
    private String failReason;

    /**
     * 备注
     */
    @Schema(description = "备注")
    private String remark;
}